<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateSettingDocumentsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('setting_documents', function (Blueprint $table) {
            $table->charset = 'utf8';
            $table->collation = 'utf8_general_ci';
            $table->comment = '文档配置表';
            $table->increments('id');
            $table->unsignedTinyInteger('type')->comment('类型(1 注册,2 提单 3 收款 4 收款)');
            $table->string('channel_code',127)->index()->default(0)->comment('资方编号');
            $table->string("document_name",225)->default('')->comment('文档名称');
            $table->longText('document_content')->comment('文档的的内容 是一个json');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('setting_documents');
    }
}
